

// 订单商品api
import service from "../utils/request.js";



// 查询
export function searchGoods(obj) {

  // return axios.get("/api/orderGoods/all", { params: obj }).then(({ data }) => {
  //   return data;
  // });
  return service.get("/orderGoods/all", { params: obj }).then((res) => {
    console.log("data", res);
    return res;
  });

}


// 修改
export function putGoods(id, obj) {
  return service.put(`/orderGoods/${id}`, obj).then((res) => {
    return res;
  });

}

// 增加
export function addGoods(obj) {
  return service.get("/orderGoods", obj).then((res) => {
    return res;
  });

}

// 删除
export function delGoods(id) {
  return service.delete(`/orderGoods/${id}`).then((res) => {
    return res;
  });

}











